//
//  ZGSDetaileSonModel.m
//  MapleLeaf
//
//  Created by 邝子涵 on 15/12/2.
//  Copyright © 2015年 AntennaBabyTeam. All rights reserved.
//

#import "ZGSDetaileModel.h"

@implementation ZGSDetaileModel

- (instancetype)initWithDataSource:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        [self setValuesForKeysWithDictionary:dic];
    }
    return self;
}

- (id)valueForUndefinedKey:(NSString *)key{
    return nil;
}


- (void)setValue:(id)value forUndefinedKey:(NSString *)key{
    if ([key isEqualToString:@"msgCommentList"]) {
        NSArray *arr = value;
        
        NSMutableArray *mArr = [NSMutableArray arrayWithCapacity:0];
        
        for (NSDictionary *tempDic in arr) {
            ZGSmsgCommentListModel *model = [[ZGSmsgCommentListModel alloc] initWithDataSource:tempDic];
            [mArr addObject:model];
        }
        self.msgCommentListArray = [NSArray arrayWithArray:mArr];
    }
}





@end
